import { StatueUserPlayer } from "../../../scene/player/entity/StatueUserPlayer";
import { RolePlayerCopy } from "./RolePlayerCopy";
import { FrameTimer } from "../../../../../com/gengine/core/frame/FrameTimer";
import { DirectionType } from "../../../scene/modle/data/DirectionType";
import { ActionType } from "../../../scene/modle/data/ActionType";
type int = number;
//class ShadowPlayer
    
    export  class ShadowPlayer extends StatueUserPlayer
    {
        constructor(arg1: RolePlayerCopy)
        {
            super();
            this.copyFromRole(arg1);
            var loc1;
            this.mouseEnabled = loc1 = false;
            this.mouseChildren = loc1;
            return;
        }

        protected /* override */ onEnterFrameHandler(arg1: FrameTimer): void
        {
            var loc1=true;
            if (bodyState.moduleID != -1) 
            {
                loc1 = _bodyPlayer.isloadComplete;
            }
            var loc2=true;
            if (weaponState.moduleID != -1) 
            {
                loc2 = _weaponsPlayer.isloadComplete;
            }
            if (loc1 && loc2) 
            {
                _timer.stop();
            }
            super.onEnterFrameHandler(arg1);
            return;
        }

        /* internal  */copyFromRole(arg1: RolePlayerCopy): void
        {
            camp = arg1.camp;
            sex = arg1.sex;
            career = arg1.career;
            reserveJs.weaponStPerLv = arg1.reserveJs.weaponStPerLv;
            reserveJs.wingStrPerLv = arg1.reserveJs.wingStrPerLv;
            updateEquipByDic(arg1.equipsDictionary);
            wxPlayerShow();
            this.updateDirect(DirectionType.South);
            return;
        }

        public updateDirect(arg1: int): void
        {
            updateFrame(ActionType.Stand, arg1, 0);
            return;
        }
    }
